package com.epower.dataobject;

import java.util.Collections;
import java.util.Date;
import java.util.List;

import com.epower.base.BaseDO;
import com.epower.bo.epowersentence.EpowerSentenceService;
import com.epower.utils.HttpUtils;

public class EpowerWordForDayDO extends BaseDO {

	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	private Integer id;

	private String spelling;
	

	/**
	 * content : 内容
	 */
	private String content;

	/**
	 * showtime : 展示的时间
	 */
	private java.sql.Date showtime;

	/**
	 * rank :级别
	 */
	private Integer rank;

	/**
	 * rating :推荐力度
	 */
	private Integer rating;

	/**
	 * status : 0:无效 1:有效
	 */
	private Integer status;

	/**
	 * createtime
	 */
	private Date createtime;

	/**
	 * updatetime
	 */
	private Date updatetime;

	private Integer groupid;
	
	private String mainSpelling;//主词的拼写
	
	private String root;
	
	private int main;

	private List<EpowerSentenceDO> sentenceList;
	
	private EpowerSentenceService epowerSentenceBO;
	
	public List<EpowerSentenceDO> getSentenceList() {
		if (spelling == null || spelling.isEmpty()) {
			return Collections.EMPTY_LIST;
		}
		if (sentenceList == null || sentenceList.isEmpty()) {
			sentenceList = epowerSentenceBO.querySentenceBySpelling(spelling);
		}
		return sentenceList;
	}

	public void setSentenceList(List<EpowerSentenceDO> sentenceList) {
		this.sentenceList = sentenceList;
	}

	public String getMainSpelling() {
		return mainSpelling;
	}

	public void setMainSpelling(String mainSpelling) {
		this.mainSpelling = mainSpelling;
	}

	public Integer getGroupid() {
		return groupid;
	}

	public void setGroupid(Integer groupid) {
		this.groupid = groupid;
	}

	public String getRoot() {
		return root;
	}

	public void setRoot(String root) {
		this.root = root;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
    
    public String getSpelling() {
        return spelling;
    }
    
    public void setSpelling(String spelling) {
        this.spelling = spelling;
    }

    public java.sql.Date getShowtime() {
		return showtime;
	}

	public void setShowtime(java.sql.Date showtime) {
		this.showtime = showtime;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getRank() {
		return rank;
	}

	public void setRank(Integer rank) {
		this.rank = rank;
	}

	public Integer getRating() {
		return rating;
	}

	public void setRating(Integer rating) {
		this.rating = rating;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

    public int getMain() {
        return main;
    }
    
    public void setMain(int main) {
        this.main = main;
    }
    
    public void setEpowerSentenceBO(EpowerSentenceService epowerSentenceBO) {
		this.epowerSentenceBO = epowerSentenceBO;
	}
}
